<template>
	<view class="sh-team">
		<view class="flex justify-between">
			<view class="sh-team__text1">我的团队</view>
			<view class="sh-team__text2" @tap="$Router.push('/pages/app/commission/team')">更多></view>
		</view>

		<view class="sh-team__box">
			<image v-for="item in teamList" :key="item.id" class="sh-team__image" :src="item.avatar || '/static/images/demo1.png'" mode="widthFix"></image>
			<!-- <image class="sh-team__image" src="/static/images/demo1.png" mode="widthFix"></image>
			<image class="sh-team__image" src="/static/images/demo1.png" mode="widthFix"></image>
			<image class="sh-team__image" src="/static/images/demo1.png" mode="widthFix"></image>
			<image class="sh-team__image" src="/static/images/demo1.png" mode="widthFix"></image> -->
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				teamList: [], //团队列表
			};
		},
		created() {
			this.getTeam();
		},
		methods: {
			getTeam() {
				let that = this;
				that
					.$http("commission.team", {
						page: 1,
					})
					.then(res => {
						if (res.code === 1) {
							let arr = res.data.teams.data;
							arr.map(item => {
								item.isUnfold = false;
							});
							that.teamList = [...arr];
						}
					});
			},
		},
	};
</script>

<style lang="scss" scoped>
	.sh-team {
		width: 100%;
		margin-top: 18rpx;
		padding: 32rpx;
		background-color: #ffffff;

		&__text1 {
			font-weight: 600;
			font-size: 36rpx;
			color: #333333;
			font-style: normal;
			text-transform: none;
		}

		&__text2 {
			font-weight: 400;
			font-size: 28rpx;
			color: #999999;
			font-style: normal;
			text-transform: none;
		}

		&__box {
			margin-top: 20rpx;
		}

		&__image {
			width: 108rpx;
			height: 108rpx;
			border-radius: 50%;
			margin-right: 36rpx;

			&:last-child {
				margin-right: 0;
			}
		}
	}
</style>
